package com.qt.map;

import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;

public class MapTestDemo01 {
	public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();

        map.put("zhangsan", "1");
        map.put("lisi", "2");
        map.put("wangwu", "3");

        map.forEach(new BiConsumer<String, String>() {
            @Override
            public void accept(String key, String value) {
                System.out.println(key + ":" + value);
            }
        });

        System.out.println("----------------");

        map.forEach(( key,  value)-> System.out.println(key + ":" + value));
        System.out.println("----------------");
        map.forEach((key, value) -> System.out.println(key + ":" + value));


	}
}
